﻿#pragma once

#include <xy/ais/object.h>
#include <xy/geom/bspline_curve.h>
#include <xy/geom/bspline_surface.h>

namespace xy
{

namespace ais
{

class builder
{
  public:
    /**
     * @brief 构造带有 xyz 坐标轴的点对象
     *
     * @param[in] point
     * @return std::shared_ptr<object>
     */
    static std::shared_ptr<object> create_point(const geom::vec3 &point);

    /**
     * @brief 构造带有指定坐标轴的点对象
     *
     * @param[in] point
     * @param[in] axis
     * @return std::shared_ptr<object>
     */
    static std::shared_ptr<object> create_point(const geom::vec3 &point, const std::vector<geom::vec3> &axis);

    /**
     * @brief 构造定向向量
     *
     * @param[in] vec
     * @return std::shared_ptr<object>
     */
    static std::shared_ptr<object> create_vector(const geom::vec3 &start, const geom::vec3 &end);

    /**
     * @brief 构造曲线
     *
     * @param[in] curve
     * @return std::shared_ptr<object>
     */
    static std::shared_ptr<object> create_curve(std::shared_ptr<geom::bspline_curve<3>> curve);

    /**
     * @brief 构造曲面
     *
     * @param[in] surface
     * @return std::shared_ptr<object>
     */
    static std::shared_ptr<object> create_surface(std::shared_ptr<geom::bspline_surface<3>> surface);
};

} // namespace ais

} // namespace xy
